#ifndef GEOMETRYENGINE_H
#define GEOMETRYENGINE_H

#include <QVector2D>
#include <QColor>
#include <QOpenGLBuffer>
#include <QOpenGLTexture>
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include "customdata.h"

class GeometryEngine:protected QOpenGLFunctions
{
public:
    GeometryEngine();
    ~GeometryEngine();

    void addVectorData(CustomData* data,bool isString,bool isDepnedOther,ColorMap colorMap,QList<float> *lstRange = 0);
    void drawCubeGeometry(QOpenGLShaderProgram *program);
    void setColorMapByZ(CustomData* data,bool isString,ColorMap colorMap);
    void setColorMapByName(CustomData* data,QString name,ColorMap colorMap);
public slots:

private:
    QOpenGLBuffer vBuffer;
    QOpenGLBuffer indexBuf;

    uint vertexNum = 0;
    uint faceCount = 0;


    bool isExistData = false;
};

#endif // GEOMETRYENGINE_H
